<template>
  <div class="home-container">
    <div class="content-header">
      <h1 class="page-title">Page Factory</h1>
      <p class="page-subtitle">Vue3 + 微前端开发平台</p>
    </div>

    <div class="status-section">
      <div class="status-card">
        <div class="status-icon">✅</div>
        <div class="status-text">Vue3应用正常运行</div>
      </div>
      <div class="status-card">
        <div class="status-icon">🏗️</div>
        <div class="status-text">微前端架构准备就绪</div>
      </div>
    </div>

    <div class="modules-section">
      <h2>🚀 微前端模块导航</h2>
      <div class="modules-grid">
        <RouterLink to="/ai-naming" class="module-card">
          <div class="module-icon">✨</div>
          <div class="module-info">
            <h3>AI起名小程序</h3>
            <p>智能名字生成，结合生辰八字与AI智慧</p>
          </div>
          <div class="module-arrow">→</div>
        </RouterLink>

        <RouterLink to="/office-pdf" class="module-card">
          <div class="module-icon">📄</div>
          <div class="module-info">
            <h3>Office转PDF</h3>
            <p>文件转换，批量处理</p>
          </div>
          <div class="module-arrow">→</div>
        </RouterLink>

        <RouterLink to="/ai-bot" class="module-card">
          <div class="module-icon">🤖</div>
          <div class="module-info">
            <h3>AI聊天机器人</h3>
            <p>智能对话，模型选择</p>
          </div>
          <div class="module-arrow">→</div>
        </RouterLink>

        <RouterLink to="/draw-a-fish" class="module-card">
          <div class="module-icon">🐠</div>
          <div class="module-info">
            <h3>Draw a Fish</h3>
            <p>绘制你的鱼，观看它在虚拟鱼缸中游动</p>
          </div>
          <div class="module-arrow">→</div>
        </RouterLink>
      </div>
    </div>

    <div class="features-section">
      <h3>🎯 核心特性</h3>
      <div class="features-container">
        <div class="feature-item">🎨 每个模块独特主题</div>
        <div class="feature-item">🔄 微前端架构，模块独立</div>
        <div class="feature-item">⚡ 动态路由，主题切换</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { RouterLink } from 'vue-router'
</script>

<style scoped>
.home-container {
  max-width: 1200px;
  margin: 0 auto;
}

.content-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #6a11cb;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #666;
  font-weight: 300;
}

.status-section {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f8fafc;
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.modules-section {
  margin-bottom: 3rem;
}

.modules-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #ffffff;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.module-icon {
  font-size: 3rem;
  min-width: 60px;
}

.module-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  color: #333;
}

.module-info p {
  margin: 0;
  opacity: 0.8;
  line-height: 1.5;
}

.module-arrow {
  margin-left: auto;
  font-size: 1.5rem;
  opacity: 0.6;
}

.features-section {
  text-align: center;
}

.features-section h3 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.features-container {
  max-width: 800px;
  margin: 0 auto;
}

.feature-item {
  display: inline-block;
  padding: 1rem 2rem;
  background: #f8fafc;
  border-radius: 8px;
  margin: 0.5rem;
  border: 1px solid #e2e8f0;
}

.home-container {
  background: #f5f7fa;
  min-height: 100vh;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (max-width: 768px) {
  .home-container {
    padding: 1rem;
  }

  .status-section {
    flex-direction: column;
    gap: 1rem;
  }

  .modules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .module-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .module-arrow {
    margin-left: 0;
    margin-top: 1rem;
  }
}
</style>